SRCS = \
	main.c errno.c endian.c signal.c \
	thr.c mtx.c cond.c rwl.c \
	time.c time_utime1.c time_utime2.c time_conv.c time_sleep.c \
	sysapi.c sysapi_opentmp.c sysapi_path.c \
	sysapi_getcwd.c sysapi_mkdir.c sysapi_rmdir.c sysapi_getpnm.c \
	sysapi_poll.c sysapi_epoll.c sysapi_link.c sysapi_trimpath.c \
	unxapi.c \
	assert.c ctype.c ctype_unicode.c memory.c \
	string.c string_size.c string_fill.c string_copy.c string_concat.c \
	string_compar.c string_search.c string_rotate.c string_dup.c \
	string_ctype.c string_strtok.c string_strspl.c string_strfnmat.c \
	string_strtodn.c string_strvec.c string_word.c \
	mstring.c wstring.c str.c strv.c \
	stdlib.c stdlib_bitcount.c stdlib_blowfish.c \
	stdlib_rc4.c stdlib_base64.c stdlib_md5.c \
	search.c sort.c \
	fio.c tio.c tio_get.c tio_put.c sio.c \
	stdcli.c stdio.c locale.c utf8.c arr.c list.c
OBJS = $(SRCS:.c=.o)
OUT = libxpbas.a

CC = @CC@
RANLIB = @RANLIB@
CFLAGS = @CFLAGS@ -I@abs_top_builddir@
LDFLAGS = @LDFLAGS@
LIBS = @LIBS@

all: $(OBJS)
	ar cr $(OUT) $(OBJS)
	ranlib $(OUT)

clean:
	rm -rf $(OBJS) $(OUT) *.o

.SUFFIXES: .c .o
.c.o:
	$(CC) $(CFLAGS) -c $<
